if (cT contains "Bitmap") or (cT contains "PIC") then
set theFile to the fileName of cast z
if theFile <> EMPTY then
set theName to the name of cast z
if (theName = "PS_MARKG.PIC") or (theName = "VideoDouble") or (theName = "PEOPLEHS.PIC0") or (theName = "PEOPLEHS.PIC1") or (theName = "AWLNDSC.PIC0") or (theName = "AWLNDSC.PIC1") or (theName = "AWPORTR.PIC0") or (theName = "AWPORTR.PIC1") then
next repeat
end if
if the freeBlock < 1000000 then
put "Not enough memory to continue import. Please save changes, re-open " & "this file, and re-run the IMPORTPICS handler to continue. " & "You may need to do this several times."
exit
next repeat
end if
put "Importing PICT " & z
set thePal to the palette of cast z
puppetPalette(thePal)
set regP to the regPoint of cast z
importFileInto(cast z, theFile)
set the regPoint of cast z to regP
end if
end if
end repeat
puppetPalette(0)
end
on setPalette
repeat with z = 233 to 257
set the palette of cast z to 373
end repeat
end
on fixFontsPeople
set the foreColor of cast "Person Name0" to 18
set the foreColor of cast "Person Name1" to 18
set the foreColor of cast "Person Title0" to 18
set the foreColor of cast "Person Title1" to 18
set the backColor of cast "Person Name0" to 255
set the backColor of cast "Person Name1" to 255
set the backColor of cast "Person Title0" to 255
set the backColor of cast "Person Title1" to 255
end
on movFonts
set the foreColor of cast "About Stage" to 16
set the foreColor of cast "MOVTXT_C3" to 16
set the foreColor of cast "MOVTXT_C2" to 16
set the foreColor of cast "MOVTXT_C1" to 16
set the backColor of cast "About Stage" to 250
set the backColor of cast "MOVTXT_C3" to 250
set the backColor of cast "MOVTXT_C2" to 250
set the backColor of cast "MOVTXT_C1" to 250
end
on sbFonts
set the foreColor of cast "SB_Scene" to 16
set the foreColor of cast "SB_Name" to 16
set the foreColor of cast "SB_Shot" to 16
set the backColor of cast "SB_Scene" to 250
set the backColor of cast "SB_Name" to 250
set the backColor of cast "SB_Shot" to 250
end
on setFiles
repeat with z = 1 to 1000
if (z mod 50) = 0 then
put z
end if
set cT to string(the castType of cast z)
if (cT contains "Bitmap") or (cT contains "PIC") or (cT contains "Video") then
set the fileName of cast z to the fileName of cast z
end if
end repeat
end
on findCastFile
repeat with z = 1 to 1000
set cT to string(the castType of cast z)
if (cT contains "Bitmap") or (cT contains "PIC") then
set cfName to the fileName of cast z
if offset("Title.PIC", cfName) > 0 then
beep()
put z
end if
end if
end repeat
end
on findScript theNum
set theNum to value(theNum)
repeat with z = 1 to 1000
if the script of cast z = theNum then
end if
end repeat
end
on updateMovies
set startCast to 400
set movieData to field "MOVBLD"
set numRecs to the number of lines in movieData
set the itemDelimiter to "|"
if numRecs > 70 then
alert("Number of records (" & numRecs & ") exceeds slots (70)")
exit
end if
repeat with z = 1 to numRecs
put z
set thisData to line z of movieData
set theFile to item 1 of thisData
set theName to item 2 of thisData
set thePalette to item 3 of thisData
set hasAudio to item 4 of thisData
set castNum to startCast + z - 1
set the fileName of cast castNum to theFile
set the name of cast castNum to theName
set palCastNum to the number of cast (thePalette && "Palette")
if palCastNum < 1 then
put "No palette imported: " & thePalette
end if
set the pausedAtStart of cast castNum to 1
set the loop of cast castNum to 0
set the crop of cast castNum to 0
set the center of cast castNum to 0
set the directToStage of cast castNum to 1
set the video of cast castNum to 1
set the sound of cast castNum to value(hasAudio)
set the preLoad of cast castNum to 0
end repeat
repeat with z = numRecs + 1 to 70
set castNum to startCast + z - 1
set the fileName of cast castNum to "TRAILER.MOV"
set the pausedAtStart of cast castNum to 1
set the name of cast castNum to "Unused Movie"
end repeat
set the itemDelimiter to ","
end
on rebuildPalettes
rebuildPalette()
end
on rebuildPalette
global gPaletteTable
pause()
set gPaletteTable to EMPTY
set start to the frame
repeat with z = 1 to the lastFrame
pause()
go(z)
if (the castNum of sprite 1 > 1) or (the castNum of sprite 3 > 1) then
set f to the framePalette
if f = -1 then
set f to 0
end if
put f into line z of gPaletteTable
end if
end repeat
put gPaletteTable into field "Palette Table"
go(start)
end
on updateFields
repeat with z = 1 to 1000
put z
if string(the castType of cast z) contains "Text" then
set the textFont of field z to "Palatino"
end if
end repeat
end
on findSize
repeat with z = 1 to 1000
set cT to string(the castType of cast z)
if (cT contains "Bitmap") or (cT contains "PIC") then
put z && the size of cast z && the palette of cast z
end if
end repeat
end
on findPalette findPal
set findPal to value(findPal)
repeat with z = 1 to 1000
set cT to string(the castType of cast z)
if (cT contains "Bitmap") or (cT contains "PIC") then
if the palette of cast z = findPal then
put z
end if
end if
end repeat
end
on importAll
global gReadObj
spinCursor()
set theFiles to "MOVBLD,MOVTXT_1,MOVTXT_C1,MOVTXT_C2,MOVTXT_C3,MOVTXT_CD," & "MOVTXT_CN,MOVTXT_F,PSDATA_0,PSDATA_1,PSDATA_2,PSDATA_3,PSDATA_C," & "PSDATA_D,PSDATA_R1,PSDATA_R2,SBTXT_0,SBTXT_1,SBTXT_2,SBTXT_3,SBTXT_4,SBTXT_PD," & "SBTXT_PU,PEOPLE_0,PEOPLE_1,PEOPLE_2,PEOPLE_3,PEOPLE_C,PEOPLE_D,PEOPLE_P1,PEOPLE_P2,PEOPLE_P3," & "IVTXT_1,IVTXT_P,IVTXT_PD,IVTXT_PR,IVTXT_Q,IVTXT_QD,IVTXT_QR," & "ANWIS_0,ANWIS_1,ANWIS_2,ANWIS_3,ANWIS_4,ANWIS_5,ANWIS_6,ANWIS_7,ANWIS_CD,ANWIS_CN,ANWIS_CT," & "ANWIS_C1,ANWIS_C2,ANWIS_C3,ANWIS_C4,ANWIS_C5,HELP_L1,HELP_L2"
set prefix to "STARGATE: BUILD Data:"
repeat with z = 1 to the number of items in theFiles
set thisFile to item z of theFiles
set gReadObj to FileIO(mnew, "read", prefix & thisFile)